<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2020/7/24
  Time: 15:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/pages/commons/head-meta.jsp" %>
<%@ include file="/WEB-INF/pages/commons/js-meta.jsp" %>
<html>
<head>
    <title>管理员列表</title>
</head>
<body>
<table class="table table-bordered table-hover">
    <tr class="info" style="font-size: 20px;font-weight: bolder;text-align: center">
        <a href="${ctx}/admin/go/index">
            <td colspan="5"><a title="点击返回首页" href="${ctx}/admin/go/index">管理员列表展示</a></td>
        </a>

    </tr>
    <tr class="active" style="font-size: 20px;font-weight: bolder;text-align: center">
        <td>ID</td>
        <td>账号</td>
        <td>联系电话</td>
        <td>创建时间</td>
        <td>操作</td>
    </tr>

    <c:forEach items="${list}" var="admin">
        <tr class="active" style="text-align: center">
            <td>${admin.id}</td>
            <td>${admin.account}</td>
            <td>${admin.phone}</td>
            <td>${admin.createTime}</td>
            <td>
                <button type="button" class="btn btn-primary">新增</button>
                <button type="button" class="btn btn-info">编辑</button>
                <button type="button" class="btn btn-danger">删除</button>
            </td>
        </tr>
    </c:forEach>
</table>

<div>
<%--    <!-- Standard button -->--%>
<%--    <button type="button" class="btn btn-default">（默认样式）Default</button>--%>

<%--    <!-- Provides extra visual weight and identifies the primary action in a set of buttons -->--%>
<%--    <button type="button" class="btn btn-primary">新增</button>--%>

<%--    <!-- Indicates a successful or positive action -->--%>
<%--    <button type="button" class="btn btn-success">（成功）Success</button>--%>

<%--    <!-- Contextual button for informational alert messages -->--%>
<%--    <button type="button" class="btn btn-info">编辑</button>--%>

<%--    <!-- Indicates caution should be taken with this action -->--%>
<%--    <button type="button" class="btn btn-warning">（警告）Warning</button>--%>

<%--    <!-- Indicates a dangerous or potentially negative action -->--%>
<%--    <button type="button" class="btn btn-danger">删除</button>--%>

<%--    <!-- Deemphasize a button by making it look like a link while maintaining button behavior -->--%>
<%--    <button type="button" class="btn btn-link">（链接）Link</button>--%>
</div>

</body>
<script>
    $(function () {
        // search();
    })

    $(document).ready(function(){
        $("add").click(function(){
            $.post("/admin/add",
                {
                    account:"jack",
                    password:"123456"
                },
                function(data,status){
                    alert("数据：" + data + "\n状态：" + status);
                });
        });
    });
</script>
</html>
